from building import *
import os

group = []

if GetDepend(['CONFIG_OF']):
    cwd = GetCurrentDir()

    src = Glob('*.c')

    group = DefineGroup('ofw', src, depend=[''])

    list = os.listdir(cwd)
    for item in list:
        if os.path.isfile(os.path.join(cwd, item, 'SConscript')):
            group = group + SConscript(os.path.join(item, 'SConscript'))

Return('group')
